<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    finally方法是ES9新增的特性，表示无论Promise对象是成功还是失败，最终都会执行
    finally方法的回调函数是不接受参数
    <script>
        let p1 = new Promise((resolve,reject)=>{
            resolve(123)
        })
        p1.then(value => {
            console.log(value);
        }).catch(reason => {
            console.log(reason);           
        }).finally(()=>{
            console.log('最终执行');
        })
    </script>
</body>
</html>